package com.yanqu.road.entity.autodata.cookboy;

import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.autodata.AutoDataObject;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author : Cxp
 * @Time : 2024-11-29
 * @Description : 小当家二阶段自动回访记录
 */

@FieldTypeAnnotation(tableName = "t_c_activity_cookboy2_auto_join_record")
public class CookBoy2AutoJoinRecord extends AutoDataObject {
    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "区服ID")
    private long serverId;

    @FieldTypeAnnotation(desc = "摊主活动ID")
    private int hostActivityId;

    @FieldTypeAnnotation(desc = "摊主玩家ID", select = true, update = true)
    private long hostId;

    @FieldTypeAnnotation(desc = "摊主区服ID")
    private long hostServerId;

    @FieldTypeAnnotation(desc = "试吃汤勺类型和数量")
    private ConcurrentHashMap<Integer, Integer> spoonMap;

    @FieldTypeAnnotation(desc = "最后一次试吃时间")
    private long lastJoinTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if (this.serverId != serverId) {
            this.serverId = serverId;
            setOp(DataStatus.Update);
        }
    }

    public int getHostActivityId() {
        return hostActivityId;
    }

    public void setHostActivityId(int hostActivityId) {
        if (this.hostActivityId != hostActivityId) {
            this.hostActivityId = hostActivityId;
            setOp(DataStatus.Update);
        }
    }

    public long getHostId() {
        return hostId;
    }

    public void setHostId(long hostId) {
        if (this.hostId != hostId) {
            this.hostId = hostId;
            setOp(DataStatus.Update);
        }
    }

    public long getHostServerId() {
        return hostServerId;
    }

    public void setHostServerId(long hostServerId) {
        if (this.hostServerId != hostServerId) {
            this.hostServerId = hostServerId;
            setOp(DataStatus.Update);
        }
    }

    public ConcurrentHashMap<Integer, Integer> getSpoonMap() {
        if (spoonMap == null) {
            return new ConcurrentHashMap<>();
        }
        return spoonMap;
    }

    public void setSpoonMap(ConcurrentHashMap<Integer, Integer> spoonMap) {
        if (this.spoonMap != spoonMap) {
            this.spoonMap = spoonMap;
            setOp(DataStatus.Update);
        }
    }

    public long getLastJoinTime() {
        return lastJoinTime;
    }

    public void setLastJoinTime(long joinTime) {
        if (this.lastJoinTime != joinTime) {
            this.lastJoinTime = joinTime;
            setOp(DataStatus.Update);
        }
    }
}
